package com.zzyl.mapper;

import com.zzyl.entity.User;
import com.zzyl.entity.UserRole;
import lombok.Data;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
 public interface UserRoleMapp {

    @Select("select * from sys_user_role where role_id = #{id}")
    List<UserRole> selectByRole(Long id);

    void insertBatch(List<UserRole> userRoles);
    
    @Select("select * from sys_user where id = #{id}")
    User paiduan(Long id);
    @Update("update sys_user set is_delete = #{isDelete} where id = #{id}")
    void shanchu( @Param("id") Long id, @Param("isDelete") Integer isDelete);

    @Delete("delete from sys_user_role where user_id = #{id}")
   void deleteByUserId(Long id);
}
